package com.mgee.netty.server.constant;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * 消息服务相关常量
 * @author miles
 *
 */
public class MessagingConst {
	/**
	 * app id 1，默认值1
	 */
	public static final int APP_ID_1 = 1;
	/**
	 * 版本号1，默认值1
	 */
	public static final int VERSION_1 = 1;
	
	public static final String TYPE_URL_PREFIX = "type.googleapis.com/";
	public static final String TYPE_LOGIN_REQUEST = TYPE_URL_PREFIX + "Im.LoginRequest";
	public static final String TYPE_LOGIN_FLIGHT_REQUEST = TYPE_URL_PREFIX + "Im.UserloginRequest";
	public static final String TYPE_LOGIN_RESPONSE = TYPE_URL_PREFIX + "Im.LoginResponse";
//	public static final String TYPE_CHAT_REQUEST = TYPE_URL_PREFIX + "Im.ChatRequest";
//	public static final String TYPE_CHAT_RESPONSE = TYPE_URL_PREFIX + "Im.ChatResponse";
	public static final String TYPE_DATA_REQUEST = TYPE_URL_PREFIX + "Im.DataRequest";
	public static final String TYPE_DATA_RESPONSE = TYPE_URL_PREFIX + "Im.DataResponse";
	public static final String TYPE_MESSAGE_NOTIFICATION = TYPE_URL_PREFIX + "Im.MessageNotification";
	public static final String TYPE_GAME_NOTIFICATION = TYPE_URL_PREFIX + "Im.GameNotification";
	public static final String TYPE_GAME_COMMAND = TYPE_URL_PREFIX + "Im.GameCommand";
	public static final String TYPE_GAME_COMMAND_RESPONSE = TYPE_URL_PREFIX + "Im.GameCommandResponse";
	public static final String TYPE_ERROR_RESPONSE = TYPE_URL_PREFIX + "Im.ErrorResponse";
	
	public static final String TYPE_JOIN_LOBBY_REQUEST = TYPE_URL_PREFIX + "Im.JoinLobbyRequest";
	public static final String TYPE_LEAVE_LOBBY_REQUEST = TYPE_URL_PREFIX + "Im.LeaveLobbyRequest";
	public static final String TYPE_LOBBY_INFO_REQUEST = TYPE_URL_PREFIX + "Im.LobbyInfoRequest";
	
	public static final String TYPE_CREATE_PLAYER_REQUEST = TYPE_URL_PREFIX + "Im.CreatePlayerRequest";
	
	public static final String TYPE_JOIN_LOBBYROOM_REQUEST = TYPE_URL_PREFIX + "Im.JoiRoomInLobbyRequest";
	public static final String TYPE_LEAVE_LOBBYROOM_REQUEST = TYPE_URL_PREFIX + "Im.LeaveRoomRequest";
	public static final String TYPE_UPDATE_LOBBYROOM_REQUEST = TYPE_URL_PREFIX + "Im.UpdateRoomInfoRequest";
	
	public static final String TYPE_PUSH_TASKINFO_REQUEST = TYPE_URL_PREFIX + "Im.PushTaskInfoRequest";
	public static final String TYPE_TASKINFO_REQUEST = TYPE_URL_PREFIX + "Im.TaskInfo";
	public static final String TYPE_TRANSMISSION_SYNC_REQUEST = TYPE_URL_PREFIX + "Im.TransmissionSyncRequest";
	public static final String TYPE_START_GAME_REQUEST = TYPE_URL_PREFIX + "Im.StartGameRequest";
	
	public static final String TYPE_LIST_ROOM_REQUEST = TYPE_URL_PREFIX + "Im.ListRoomRequest";
	public static final String TYPE_JOIN_ROOM_REQUEST = TYPE_URL_PREFIX + "Im.JoinRoomRequest";
	//public static final String TYPE_EXIT_ROOM_REQUEST = TYPE_URL_PREFIX + "Im.ExitRoomRequest";
	public static final String TYPE_EXIT_ROOM = TYPE_URL_PREFIX + "Im.ExitRoomRequest";
	public static final String TYPE_CHAT_REQUEST = TYPE_URL_PREFIX + "Im.ChatRequest";
	public static final String TYPE_LOGOUT = TYPE_URL_PREFIX + "Im.Logout";
	public static final String TYPE_UPOS_REQUEST = TYPE_URL_PREFIX + "Im.UpPos";
	public static final String TYPE_UPOS_RESPONSE = TYPE_URL_PREFIX + "Im.UpPosResponse";
	public static final String TYPE_CLOUD_CUBE_BROADCAST = TYPE_URL_PREFIX + "ImNew.CloudCubeBroadcast";
	public static final String TYPE_CARD_ABC_LOGIN_REQUEST = TYPE_URL_PREFIX + "ImNew.CardAbcLoginRequest";
	public static final String TYPE_CARD_ABC_JOIN_REQUEST = TYPE_URL_PREFIX + "ImNew.CardAbcJoinRequest";
	public static final String TYPE_CARD_ABC_BROADCAST_REQUEST = TYPE_URL_PREFIX + "ImNew.CardAbcBroadcastRequest";

	/**
	 * 权限错误码
	 */
	public static final int RESPONSE_ERR_CODE_403 = 403;
	/**
	 * 授权错误码
	 */
	public static final int RESPONSE_ERR_CODE_401 = 401;
	/**
	 * 无效请求错误码
	 */
	public static final int RESPONSE_ERR_CODE_400 = 400;
	
	/** 缓存全局参数 */
	public static ConcurrentMap<String, String> globalParams = new ConcurrentHashMap<>();
	
	
	public static final String PARAMKEY_ROOM_MAXUSERS = "KEY_ROOM_MAXUSERS";
	
}
